package com.huawei.hianalytics.h;

import android.os.Build;
import android.text.TextUtils;
import com.huawei.hianalytics.util.f;
import com.huawei.hms.framework.network.restclient.hwhttp.HttpContants;
import java.io.BufferedWriter;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import javax.net.SocketFactory;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLSocketFactory;

public abstract class b {

    static class a extends Exception {
        a(String str) {
            super(str);
        }
    }

    public static c a(String str, String str2, String str3) {
        Map hashMap = new HashMap();
        hashMap.put("App-Id", com.huawei.hianalytics.a.b.f());
        hashMap.put("App-Ver", com.huawei.hianalytics.a.b.g());
        hashMap.put("Sdk-Name", "hianalytics");
        hashMap.put("Sdk-Ver", "2.1.4.312");
        hashMap.put("Device-Type", Build.MODEL);
        hashMap.put("Package-Name", com.huawei.hianalytics.a.b.e());
        hashMap.put("Authorization", str3);
        hashMap.put("Charset", "UTF-8");
        hashMap.put("Content-Encoding", "gzip");
        hashMap.put(HttpContants.KEY_CONTENT_TYPE, "application/x-www-form-urlencoded; charset=UTF-8");
        return a(str, str2, "POST", hashMap);
    }

    private static c a(String str, String str2, String str3, Map<String, String> map) {
        Throwable th;
        Closeable closeable = null;
        if (TextUtils.isEmpty(str)) {
            return new c(-100, "");
        }
        HttpURLConnection httpURLConnection = null;
        int i = -103;
        c cVar;
        Closeable closeable2;
        Closeable closeable3;
        try {
            httpURLConnection = a(str, str2.length(), str3, (Map) map);
            if (httpURLConnection == null) {
                try {
                    cVar = new c(-105, "");
                    f.a(9, closeable);
                    f.a(6, closeable);
                    if (httpURLConnection == null) {
                        return cVar;
                    }
                    try {
                        httpURLConnection.getInputStream().close();
                    } catch (IOException e) {
                        com.huawei.hianalytics.g.b.c("HttpClient", "event PostRequest(String): connHttp.getInputStream() close exception !");
                    }
                    httpURLConnection.disconnect();
                    com.huawei.hianalytics.g.b.a("HttpClient", "disconnect");
                    return cVar;
                } catch (IOException e2) {
                    closeable2 = closeable;
                    try {
                        com.huawei.hianalytics.g.b.c("HttpClient", "log file PostRequest(String): IO operation exception !");
                        cVar = new c(i, "");
                        f.a(9, closeable2);
                        f.a(6, closeable);
                        if (httpURLConnection == null) {
                            return cVar;
                        }
                        try {
                            httpURLConnection.getInputStream().close();
                        } catch (IOException e3) {
                            com.huawei.hianalytics.g.b.c("HttpClient", "event PostRequest(String): connHttp.getInputStream() close exception !");
                        }
                        httpURLConnection.disconnect();
                        com.huawei.hianalytics.g.b.a("HttpClient", "disconnect");
                        return cVar;
                    } catch (Throwable th2) {
                        th = th2;
                        closeable3 = closeable2;
                        f.a(9, closeable3);
                        f.a(6, closeable);
                        if (httpURLConnection != null) {
                            try {
                                httpURLConnection.getInputStream().close();
                            } catch (IOException e4) {
                                com.huawei.hianalytics.g.b.c("HttpClient", "event PostRequest(String): connHttp.getInputStream() close exception !");
                            }
                            httpURLConnection.disconnect();
                            com.huawei.hianalytics.g.b.a("HttpClient", "disconnect");
                        }
                        throw th;
                    }
                } catch (Throwable th3) {
                    th = th3;
                    closeable3 = closeable;
                    f.a(9, closeable3);
                    f.a(6, closeable);
                    if (httpURLConnection != null) {
                        httpURLConnection.getInputStream().close();
                        httpURLConnection.disconnect();
                        com.huawei.hianalytics.g.b.a("HttpClient", "disconnect");
                    }
                    throw th;
                }
            }
            closeable2 = httpURLConnection.getOutputStream();
            try {
                closeable3 = new BufferedWriter(new OutputStreamWriter(closeable2, "UTF-8"));
            } catch (IOException e5) {
                Closeable closeable4 = closeable2;
                closeable2 = closeable;
                closeable = closeable4;
                com.huawei.hianalytics.g.b.c("HttpClient", "log file PostRequest(String): IO operation exception !");
                cVar = new c(i, "");
                f.a(9, closeable2);
                f.a(6, closeable);
                if (httpURLConnection == null) {
                    return cVar;
                }
                httpURLConnection.getInputStream().close();
                httpURLConnection.disconnect();
                com.huawei.hianalytics.g.b.a("HttpClient", "disconnect");
                return cVar;
            } catch (Throwable th4) {
                th = th4;
                closeable3 = closeable;
                closeable = closeable2;
                f.a(9, closeable3);
                f.a(6, closeable);
                if (httpURLConnection != null) {
                    httpURLConnection.getInputStream().close();
                    httpURLConnection.disconnect();
                    com.huawei.hianalytics.g.b.a("HttpClient", "disconnect");
                }
                throw th;
            }
            try {
                closeable3.append(str2);
                closeable3.flush();
                i = httpURLConnection.getResponseCode();
                cVar = new c(i, b(httpURLConnection));
                f.a(9, closeable3);
                f.a(6, closeable2);
                if (httpURLConnection == null) {
                    return cVar;
                }
                try {
                    httpURLConnection.getInputStream().close();
                } catch (IOException e6) {
                    com.huawei.hianalytics.g.b.c("HttpClient", "event PostRequest(String): connHttp.getInputStream() close exception !");
                }
                httpURLConnection.disconnect();
                com.huawei.hianalytics.g.b.a("HttpClient", "disconnect");
                return cVar;
            } catch (IOException e7) {
                closeable = closeable2;
                closeable2 = closeable3;
                com.huawei.hianalytics.g.b.c("HttpClient", "log file PostRequest(String): IO operation exception !");
                cVar = new c(i, "");
                f.a(9, closeable2);
                f.a(6, closeable);
                if (httpURLConnection == null) {
                    return cVar;
                }
                httpURLConnection.getInputStream().close();
                httpURLConnection.disconnect();
                com.huawei.hianalytics.g.b.a("HttpClient", "disconnect");
                return cVar;
            } catch (Throwable th5) {
                th = th5;
                closeable = closeable2;
                f.a(9, closeable3);
                f.a(6, closeable);
                if (httpURLConnection != null) {
                    httpURLConnection.getInputStream().close();
                    httpURLConnection.disconnect();
                    com.huawei.hianalytics.g.b.a("HttpClient", "disconnect");
                }
                throw th;
            }
        } catch (a e8) {
            try {
                com.huawei.hianalytics.g.b.c("HttpClient", "sendPostRequest(String): No ssl socket factory set!");
                cVar = new c(-105, "");
                f.a(9, closeable);
                f.a(6, closeable);
                if (closeable == null) {
                    return cVar;
                }
                try {
                    httpURLConnection.getInputStream().close();
                } catch (IOException e9) {
                    com.huawei.hianalytics.g.b.c("HttpClient", "event PostRequest(String): connHttp.getInputStream() close exception !");
                }
                closeable.disconnect();
                com.huawei.hianalytics.g.b.a("HttpClient", "disconnect");
                return cVar;
            } catch (IOException e10) {
                httpURLConnection = closeable;
                closeable2 = closeable;
                com.huawei.hianalytics.g.b.c("HttpClient", "log file PostRequest(String): IO operation exception !");
                cVar = new c(i, "");
                f.a(9, closeable2);
                f.a(6, closeable);
                if (httpURLConnection == null) {
                    return cVar;
                }
                httpURLConnection.getInputStream().close();
                httpURLConnection.disconnect();
                com.huawei.hianalytics.g.b.a("HttpClient", "disconnect");
                return cVar;
            } catch (Throwable th6) {
                th = th6;
                httpURLConnection = closeable;
                closeable3 = closeable;
                f.a(9, closeable3);
                f.a(6, closeable);
                if (httpURLConnection != null) {
                    httpURLConnection.getInputStream().close();
                    httpURLConnection.disconnect();
                    com.huawei.hianalytics.g.b.a("HttpClient", "disconnect");
                }
                throw th;
            }
        }
    }

    /* JADX WARNING: inconsistent code. */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public static com.huawei.hianalytics.h.c a(java.lang.String r10, byte[] r11, java.lang.String r12, java.util.Map<java.lang.String, java.lang.String> r13) {
        /*
        r2 = -103; // 0xffffffffffffff99 float:NaN double:NaN;
        r6 = -106; // 0xffffffffffffff96 float:NaN double:NaN;
        r1 = 0;
        r9 = 6;
        r8 = 3;
        r0 = android.text.TextUtils.isEmpty(r10);
        if (r0 == 0) goto L_0x0017;
    L_0x000d:
        r0 = new com.huawei.hianalytics.h.c;
        r1 = -100;
        r2 = "";
        r0.<init>(r1, r2);
    L_0x0016:
        return r0;
    L_0x0017:
        r3 = 0;
        r0 = r11.length;	 Catch:{ a -> 0x0042 }
        r3 = a(r10, r0, r12, r13);	 Catch:{ a -> 0x0042 }
        if (r3 != 0) goto L_0x007f;
    L_0x001f:
        r0 = new com.huawei.hianalytics.h.c;	 Catch:{ IOException -> 0x01c1, SecurityException -> 0x01b7, all -> 0x01aa }
        r4 = -100;
        r5 = "";
        r0.<init>(r4, r5);	 Catch:{ IOException -> 0x01c1, SecurityException -> 0x01b7, all -> 0x01aa }
        com.huawei.hianalytics.util.f.a(r8, r1);
        com.huawei.hianalytics.util.f.a(r9, r1);
        if (r3 == 0) goto L_0x0016;
    L_0x0030:
        r1 = r3.getInputStream();	 Catch:{ Exception -> 0x0076 }
        r1.close();	 Catch:{ Exception -> 0x0076 }
    L_0x0037:
        r3.disconnect();
        r1 = "HttpClient";
        r2 = " connHttp disconnect";
        com.huawei.hianalytics.g.b.a(r1, r2);
        goto L_0x0016;
    L_0x0042:
        r0 = move-exception;
        r0 = "HttpClient";
        r4 = "PostRequest(byte[]): No ssl socket factory set!";
        com.huawei.hianalytics.g.b.c(r0, r4);	 Catch:{ IOException -> 0x00bf, SecurityException -> 0x0163, all -> 0x01a4 }
        r0 = new com.huawei.hianalytics.h.c;	 Catch:{ IOException -> 0x00bf, SecurityException -> 0x0163, all -> 0x01a4 }
        r4 = -105; // 0xffffffffffffff97 float:NaN double:NaN;
        r5 = "";
        r0.<init>(r4, r5);	 Catch:{ IOException -> 0x00bf, SecurityException -> 0x0163, all -> 0x01a4 }
        com.huawei.hianalytics.util.f.a(r8, r1);
        com.huawei.hianalytics.util.f.a(r9, r1);
        if (r1 == 0) goto L_0x0016;
    L_0x005b:
        r2 = r3.getInputStream();	 Catch:{ Exception -> 0x006d }
        r2.close();	 Catch:{ Exception -> 0x006d }
    L_0x0062:
        r1.disconnect();
        r1 = "HttpClient";
        r2 = " connHttp disconnect";
        com.huawei.hianalytics.g.b.a(r1, r2);
        goto L_0x0016;
    L_0x006d:
        r2 = move-exception;
        r2 = "HttpClient";
        r3 = "PostRequest(String): connHttp.getInputStream() close exception !";
        com.huawei.hianalytics.g.b.c(r2, r3);
        goto L_0x0062;
    L_0x0076:
        r1 = move-exception;
        r1 = "HttpClient";
        r2 = "PostRequest(String): connHttp.getInputStream() close exception !";
        com.huawei.hianalytics.g.b.c(r1, r2);
        goto L_0x0037;
    L_0x007f:
        r4 = r3.getOutputStream();	 Catch:{ IOException -> 0x01c1, SecurityException -> 0x01b7, all -> 0x01aa }
        r5 = new java.io.BufferedOutputStream;	 Catch:{ IOException -> 0x01c7, SecurityException -> 0x01ba, all -> 0x01af }
        r5.<init>(r4);	 Catch:{ IOException -> 0x01c7, SecurityException -> 0x01ba, all -> 0x01af }
        r5.write(r11);	 Catch:{ IOException -> 0x01cc, SecurityException -> 0x01be }
        r5.flush();	 Catch:{ IOException -> 0x01cc, SecurityException -> 0x01be }
        r1 = r3.getResponseCode();	 Catch:{ IOException -> 0x01cc, SecurityException -> 0x01be }
        r7 = b(r3);	 Catch:{ IOException -> 0x01d0, SecurityException -> 0x01be }
        r0 = new com.huawei.hianalytics.h.c;	 Catch:{ IOException -> 0x01d0, SecurityException -> 0x01be }
        r0.<init>(r1, r7);	 Catch:{ IOException -> 0x01d0, SecurityException -> 0x01be }
        com.huawei.hianalytics.util.f.a(r8, r5);
        com.huawei.hianalytics.util.f.a(r9, r4);
        if (r3 == 0) goto L_0x0016;
    L_0x00a3:
        r1 = r3.getInputStream();	 Catch:{ Exception -> 0x00b6 }
        r1.close();	 Catch:{ Exception -> 0x00b6 }
    L_0x00aa:
        r3.disconnect();
        r1 = "HttpClient";
        r2 = " connHttp disconnect";
        com.huawei.hianalytics.g.b.a(r1, r2);
        goto L_0x0016;
    L_0x00b6:
        r1 = move-exception;
        r1 = "HttpClient";
        r2 = "PostRequest(String): connHttp.getInputStream() close exception !";
        com.huawei.hianalytics.g.b.c(r1, r2);
        goto L_0x00aa;
    L_0x00bf:
        r0 = move-exception;
        r3 = r1;
        r4 = r1;
        r5 = r1;
        r1 = r2;
    L_0x00c4:
        r7 = r0 instanceof javax.net.ssl.SSLPeerUnverifiedException;	 Catch:{ all -> 0x010b }
        if (r7 == 0) goto L_0x00f2;
    L_0x00c8:
        r0 = "HttpClient";
        r1 = "Certificate has not been verified,Request is restricted!";
        com.huawei.hianalytics.g.b.c(r0, r1);	 Catch:{ all -> 0x010b }
        r2 = r6;
    L_0x00d0:
        r0 = new com.huawei.hianalytics.h.c;	 Catch:{ all -> 0x010b }
        r1 = "";
        r0.<init>(r2, r1);	 Catch:{ all -> 0x010b }
        com.huawei.hianalytics.util.f.a(r8, r5);
        com.huawei.hianalytics.util.f.a(r9, r4);
        if (r3 == 0) goto L_0x0016;
    L_0x00df:
        r1 = r3.getInputStream();	 Catch:{ Exception -> 0x015a }
        r1.close();	 Catch:{ Exception -> 0x015a }
    L_0x00e6:
        r3.disconnect();
        r1 = "HttpClient";
        r2 = " connHttp disconnect";
        com.huawei.hianalytics.g.b.a(r1, r2);
        goto L_0x0016;
    L_0x00f2:
        r7 = r0 instanceof javax.net.ssl.SSLHandshakeException;	 Catch:{ all -> 0x010b }
        if (r7 == 0) goto L_0x00ff;
    L_0x00f6:
        r0 = "HttpClient";
        r1 = "Chain validation failed,Certificate expired";
        com.huawei.hianalytics.g.b.c(r0, r1);	 Catch:{ all -> 0x010b }
        r2 = r6;
        goto L_0x00d0;
    L_0x00ff:
        r6 = r0 instanceof java.net.ConnectException;	 Catch:{ all -> 0x010b }
        if (r6 == 0) goto L_0x0126;
    L_0x0103:
        r0 = "HttpClient";
        r1 = "Network is unreachable or Connection refused";
        com.huawei.hianalytics.g.b.c(r0, r1);	 Catch:{ all -> 0x010b }
        goto L_0x00d0;
    L_0x010b:
        r0 = move-exception;
    L_0x010c:
        com.huawei.hianalytics.util.f.a(r8, r5);
        com.huawei.hianalytics.util.f.a(r9, r4);
        if (r3 == 0) goto L_0x0125;
    L_0x0114:
        r1 = r3.getInputStream();	 Catch:{ Exception -> 0x019a }
        r1.close();	 Catch:{ Exception -> 0x019a }
    L_0x011b:
        r3.disconnect();
        r1 = "HttpClient";
        r2 = " connHttp disconnect";
        com.huawei.hianalytics.g.b.a(r1, r2);
    L_0x0125:
        throw r0;
    L_0x0126:
        r2 = r0 instanceof java.net.UnknownHostException;	 Catch:{ all -> 0x010b }
        if (r2 == 0) goto L_0x0134;
    L_0x012a:
        r0 = "HttpClient";
        r1 = "No address associated with hostname";
        com.huawei.hianalytics.g.b.c(r0, r1);	 Catch:{ all -> 0x010b }
        r2 = -104; // 0xffffffffffffff98 float:NaN double:NaN;
        goto L_0x00d0;
    L_0x0134:
        r2 = r0 instanceof java.net.SocketTimeoutException;	 Catch:{ all -> 0x010b }
        if (r2 == 0) goto L_0x0142;
    L_0x0138:
        r0 = "HttpClient";
        r1 = "failed to connect to this address,pls check url: time out";
        com.huawei.hianalytics.g.b.c(r0, r1);	 Catch:{ all -> 0x010b }
        r2 = -102; // 0xffffffffffffff9a float:NaN double:NaN;
        goto L_0x00d0;
    L_0x0142:
        r0 = r0 instanceof java.net.MalformedURLException;	 Catch:{ all -> 0x010b }
        if (r0 == 0) goto L_0x0150;
    L_0x0146:
        r0 = "HttpClient";
        r1 = "Unknown protocol,pls check url";
        com.huawei.hianalytics.g.b.c(r0, r1);	 Catch:{ all -> 0x010b }
        r2 = -102; // 0xffffffffffffff9a float:NaN double:NaN;
        goto L_0x00d0;
    L_0x0150:
        r0 = "HttpClient";
        r2 = "events PostRequest(byte[]): Exception or something";
        com.huawei.hianalytics.g.b.c(r0, r2);	 Catch:{ all -> 0x010b }
        r2 = r1;
        goto L_0x00d0;
    L_0x015a:
        r1 = move-exception;
        r1 = "HttpClient";
        r2 = "PostRequest(String): connHttp.getInputStream() close exception !";
        com.huawei.hianalytics.g.b.c(r1, r2);
        goto L_0x00e6;
    L_0x0163:
        r0 = move-exception;
        r3 = r1;
        r5 = r1;
    L_0x0166:
        r0 = "HttpClient";
        r2 = "SecurityException with HttpClient. Please check INTERNET permission.";
        com.huawei.hianalytics.g.b.c(r0, r2);	 Catch:{ all -> 0x01b3 }
        r0 = new com.huawei.hianalytics.h.c;	 Catch:{ all -> 0x01b3 }
        r2 = -101; // 0xffffffffffffff9b float:NaN double:NaN;
        r4 = "";
        r0.<init>(r2, r4);	 Catch:{ all -> 0x01b3 }
        com.huawei.hianalytics.util.f.a(r8, r5);
        com.huawei.hianalytics.util.f.a(r9, r1);
        if (r3 == 0) goto L_0x0016;
    L_0x017e:
        r1 = r3.getInputStream();	 Catch:{ Exception -> 0x0191 }
        r1.close();	 Catch:{ Exception -> 0x0191 }
    L_0x0185:
        r3.disconnect();
        r1 = "HttpClient";
        r2 = " connHttp disconnect";
        com.huawei.hianalytics.g.b.a(r1, r2);
        goto L_0x0016;
    L_0x0191:
        r1 = move-exception;
        r1 = "HttpClient";
        r2 = "PostRequest(String): connHttp.getInputStream() close exception !";
        com.huawei.hianalytics.g.b.c(r1, r2);
        goto L_0x0185;
    L_0x019a:
        r1 = move-exception;
        r1 = "HttpClient";
        r2 = "PostRequest(String): connHttp.getInputStream() close exception !";
        com.huawei.hianalytics.g.b.c(r1, r2);
        goto L_0x011b;
    L_0x01a4:
        r0 = move-exception;
        r3 = r1;
        r4 = r1;
        r5 = r1;
        goto L_0x010c;
    L_0x01aa:
        r0 = move-exception;
        r4 = r1;
        r5 = r1;
        goto L_0x010c;
    L_0x01af:
        r0 = move-exception;
        r5 = r1;
        goto L_0x010c;
    L_0x01b3:
        r0 = move-exception;
        r4 = r1;
        goto L_0x010c;
    L_0x01b7:
        r0 = move-exception;
        r5 = r1;
        goto L_0x0166;
    L_0x01ba:
        r0 = move-exception;
        r5 = r1;
        r1 = r4;
        goto L_0x0166;
    L_0x01be:
        r0 = move-exception;
        r1 = r4;
        goto L_0x0166;
    L_0x01c1:
        r0 = move-exception;
        r4 = r1;
        r5 = r1;
        r1 = r2;
        goto L_0x00c4;
    L_0x01c7:
        r0 = move-exception;
        r5 = r1;
        r1 = r2;
        goto L_0x00c4;
    L_0x01cc:
        r0 = move-exception;
        r1 = r2;
        goto L_0x00c4;
    L_0x01d0:
        r0 = move-exception;
        goto L_0x00c4;
        */
        throw new UnsupportedOperationException("Method not decompiled: com.huawei.hianalytics.h.b.a(java.lang.String, byte[], java.lang.String, java.util.Map):com.huawei.hianalytics.h.c");
    }

    public static c a(String str, byte[] bArr, Map<String, String> map) {
        return a(str, bArr, "POST", (Map) map);
    }

    private static HttpURLConnection a(String str, int i, String str2, Map<String, String> map) {
        if (TextUtils.isEmpty(str)) {
            com.huawei.hianalytics.g.b.d("HttpClient", "CreateConnection: invalid urlPath.");
            return null;
        }
        HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(str).openConnection();
        a(httpURLConnection);
        httpURLConnection.setRequestMethod(str2);
        httpURLConnection.setConnectTimeout(16000);
        httpURLConnection.setReadTimeout(16000);
        httpURLConnection.setDoOutput(true);
        httpURLConnection.setRequestProperty(HttpContants.KEY_CONTENT_TYPE, "application/json; charset=UTF-8");
        httpURLConnection.setRequestProperty("Content-Length", String.valueOf(i));
        httpURLConnection.setRequestProperty("App-Ver", "2.1.4.312");
        httpURLConnection.setRequestProperty("Connection", "close");
        if (map == null || map.size() < 1) {
            return httpURLConnection;
        }
        for (Entry entry : map.entrySet()) {
            String str3 = (String) entry.getKey();
            if (!(str3 == null || TextUtils.isEmpty(str3))) {
                httpURLConnection.setRequestProperty(str3, (String) entry.getValue());
            }
        }
        return httpURLConnection;
    }

    private static void a(HttpURLConnection httpURLConnection) {
        if (httpURLConnection instanceof HttpsURLConnection) {
            HttpsURLConnection httpsURLConnection = (HttpsURLConnection) httpURLConnection;
            SocketFactory a = a.a();
            if (a == null || !(a instanceof SSLSocketFactory)) {
                throw new a("No ssl socket factory set");
            }
            httpsURLConnection.setSSLSocketFactory((SSLSocketFactory) a);
            httpsURLConnection.setHostnameVerifier(a.a);
        }
    }

    private static String b(HttpURLConnection httpURLConnection) {
        Closeable inputStream;
        String a;
        Throwable th;
        try {
            inputStream = httpURLConnection.getInputStream();
            try {
                a = f.a((InputStream) inputStream, 2048);
                f.a(7, inputStream);
            } catch (IOException e) {
                try {
                    com.huawei.hianalytics.g.b.c("HttpClient", "When Response Content From Connection inputStream operation exception!", Integer.valueOf(httpURLConnection.getResponseCode()));
                    a = "";
                    f.a(7, inputStream);
                    return a;
                } catch (Throwable th2) {
                    th = th2;
                    f.a(7, inputStream);
                    throw th;
                }
            }
        } catch (IOException e2) {
            inputStream = null;
            com.huawei.hianalytics.g.b.c("HttpClient", "When Response Content From Connection inputStream operation exception!", Integer.valueOf(httpURLConnection.getResponseCode()));
            a = "";
            f.a(7, inputStream);
            return a;
        } catch (Throwable th3) {
            Throwable th4 = th3;
            inputStream = null;
            th = th4;
            f.a(7, inputStream);
            throw th;
        }
        return a;
    }
}
